package pl.edu.pk.adcampaignfacebook.helpers;

public final class EqualsUtil {

	  static public boolean areEqual(boolean a_this, boolean a_that){
	    //System.out.println("boolean");
	    return a_this == a_that;
	  }

	  static public boolean areEqual(char a_this, char a_that){
	    //System.out.println("char");
	    return a_this == a_that;
	  }

	  static public boolean areEqual(long a_this, long a_that){
	    /*
	    * Implementation Note
	    * Note that byte, short, and int are handled by this method, through
	    * implicit conversion.
	    */
	    //System.out.println("long");
	    return a_this == a_that;
	  }

	  static public boolean areEqual(float a_this, float a_that){
	    //System.out.println("float");
	    return Float.floatToIntBits(a_this) == Float.floatToIntBits(a_that);
	  }

	  static public boolean areEqual(double a_this, double a_that){
	    //System.out.println("double");
	    return Double.doubleToLongBits(a_this) == Double.doubleToLongBits(a_that);
	  }

	  /**
	  * Possibly-null object field.
	  *
	  * Includes type-safe enumerations and collections, but does not include
	  * arrays. See class comment.
	  */
	  static public boolean areEqual(Object a_this, Object a_that){
	    //System.out.println("Object");
	    return a_this == null ? a_that == null : a_this.equals(a_that);
	  }
	}
